<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录 - 海洋学院OJ系统</title>
    <style>
        * { margin: 0; padding: 0; }
        html, body { width: 100%; height: 100%; font-family: Arial, sans-serif; }

        .container {
            width: 100%;
            height: 100%;
        }

        .navbar {
            width: 100%;
            height: 50px;
            background-color: black;
            overflow: hidden;
        }

        .navbar a {
            display: inline-block;
            width: 80px;
            color: white;
            font-size: large;
            line-height: 50px;
            text-decoration: none;
            text-align: center;
        }

        .navbar a:hover {
            background-color: green;
        }

        .navbar .login {
            float: right;
        }

        .form-container {
            width: 400px;
            margin: 100px auto;
            padding: 30px;
            border: 1px solid #ccc;
            border-radius: 10px;
            background-color: #f9f9f9;
            text-align: center;
        }

        .form-container h2 {
            margin-bottom: 20px;
        }

        .form-container input {
            width: 90%;
            padding: 10px;
            margin: 10px 0;
            font-size: 16px;
        }

        .form-container button {
            width: 95%;
            padding: 10px;
            background-color: green;
            color: white;
            font-size: 16px;
            border: none;
            cursor: pointer;
        }

        .form-container button:hover {
            background-color: darkgreen;
        }

        .form-container p a {
            color: green;
            text-decoration: none;
        }

        .form-container p a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="navbar">
            <a href="/">首页</a>
            <a href="/all_questions">题库</a>
            <a class="login" href="/login.html">登录</a>
        </div>

        <div class="form-container">
            <h2>登录到 OJ 系统</h2>
            <form method="post" action="/login">
                <input type="text" name="username" placeholder="用户名" required>
                <input type="password" name="password" placeholder="密码" required>
                <button type="submit">登录</button>
            </form>
            <p>还没有账号？<a href="register.html">立即注册</a></p>
        </div>
    </div>
</body>
</html>
